home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Gamer (Italian) 30
/
PC Gamer IT CD 30 1-2.iso
/
MOTS
/
GAMEDATA
/
RESOURCE
/
JKMRES.GOO
/
cog_actor_mb.cog
< prev
next >
Wrap
Text File
|
1998-02-25
|
2KB
|
92 lines
# Jedi Knight Cog Script
#
# ACTOR_MB.COG
#
# ACTOR Script - Standard Mousebot
#
# [CR]
#
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
#
# ========================================================================================
symbols
message killed
message skill
message damaged
message created
message timer
template powerup=+dbattery local
thing newThing local
flex damageAmount local
flex damageType local
flex totalDamage local
thing player local
thing killer local
end
# ========================================================================================
code
created:
// Delay the created message, so that the player definitely exists.
SetTimerEx(1.0, 1, 0.0, 0.0);
return;
killed:
player = GetLocalPlayerThing();
killer = GetSourceRef();
newThing = CreateThing(powerup, GetSenderRef());
SetLifeleft(newThing, 200.0);
// Player killed a droid.
if (player == killer)
{
ChangeInv( player, 72, 0.5 );
}
return;
# ........................................................................................
skill:
bin = GetParam(0);
if (bin == 24) // Force Pull
{
ReturnEx(GetSenderRef());
return;
}
ReturnEx(-1);
return;
# ........................................................................................
damaged:
damageAmount = GetParam(0);
damageType = GetParam(1);
totalDamage = damageAmount;
if (BitTest(damageType, 0x01)) totalDamage = 4;
ReturnEx(totalDamage);
return;
# ........................................................................................
timer:
player = GetLocalPlayerThing();
ChangeInv( player, 73, 0.5 );
return;
end